namespace 高校员工餐饮信息管理系统.Models
{
    /// <summary>
    /// 用户实体类
    /// </summary>
    public class User
    {
        public int Id { get; set; }
        
        /// <summary>
        /// 工号
        /// </summary>
        public string WorkId { get; set; } = string.Empty;
        
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; } = string.Empty;
        
        /// <summary>
        /// 密码哈希
        /// </summary>
        public string PasswordHash { get; set; } = string.Empty;
        
        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; } = string.Empty;
        
        /// <summary>
        /// 角色（教职工/商户/管理员）
        /// </summary>
        public string Role { get; set; } = string.Empty;
        
        /// <summary>
        /// 是否首次登录
        /// </summary>
        public bool IsFirstLogin { get; set; } = true;
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; } = DateTime.Now;
        
        /// <summary>
        /// 最后登录时间
        /// </summary>
        public DateTime? LastLoginAt { get; set; }
    }
}

